home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1997 September / Macworld (1997-09).dmg / Serious Software / Cherwell Scientific Demos / pro Fit / pro Fit 5.0 demo (ppc).sea / pro Fit 5.0 demo (ppc) / Examples / Programming - intro / FindMaximumAndMinimum < prev    next >
MacBinary  |  1996-04-15  |  1.9 KB  |  [ftFC/NLft]

view JSON data     |     view as text     |     open on a Mac     |     open on a PC

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: FindMaximumAndMinimum

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Mon Apr 15 13:48:43 1996, modified Mon Apr 15 13:48:43 1996, creator 'NLft', type 'ftFC', 873 bytes "FindMaximumAndMinimum" , at 0x3e9 815 bytes resource default (weak)
99% file data default
100% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[ftFC]
macFileCreator[NLft]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 15 46 69 6e 64 4d 61 | 78 69 6d 75 6d 41 6e 64 |..FindMa|ximumAnd|
|00000010| 4d 69 6e 69 6d 75 6d 00 | 00 00 00 00 00 00 00 00 |Minimum.|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 66 74 46 43 4e 4c 66 | 74 01 00 00 00 00 00 00 |.ftFCNLf|t.......|
|00000050| 00 00 00 00 00 03 69 00 | 00 03 2f ad 98 3c 7b ad |......i.|../..<{.|
|00000060| 98 3c 7b 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.<{.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 fb cf 00 00 |........|........|
|00000080| 7b 0d 74 68 69 73 20 70 | 72 6f 67 72 61 6d 20 66 |{.this p|rogram f|
|00000090| 69 6e 64 73 20 74 68 65 | 20 6d 61 78 69 6d 75 6d |inds the| maximum|
|000000a0| 20 61 6e 64 20 6d 69 6e | 69 6d 75 6d 0d 76 61 6c | and min|imum.val|
|000000b0| 75 65 73 20 69 6e 20 74 | 68 65 20 63 75 72 72 65 |ues in t|he curre|
|000000c0| 6e 74 20 73 65 6c 65 63 | 74 69 6f 6e 20 69 6e 20 |nt selec|tion in |
|000000d0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 64 61 74 61 |the curr|ent data|
|000000e0| 0d 77 69 6e 64 6f 77 20 | 61 6e 64 20 77 72 69 74 |.window |and writ|
|000000f0| 65 73 20 74 68 65 6d 20 | 74 6f 20 74 68 65 20 72 |es them |to the r|
|00000100| 65 73 75 6c 74 20 77 69 | 6e 64 6f 77 0d 0d 54 6f |esult wi|ndow..To|
|00000110| 20 72 75 6e 20 74 68 65 | 20 70 72 6f 67 72 61 6d | run the| program|
|00000120| 2c 20 63 6c 69 63 6b 20 | 74 68 65 20 62 75 74 74 |, click |the butt|
|00000130| 6f 6e 20 22 41 64 64 22 | 2c 20 74 68 65 6e 20 63 |on "Add"|, then c|
|00000140| 68 6f 6f 73 65 0d 74 68 | 65 20 70 72 6f 67 72 61 |hoose.th|e progra|
|00000150| 6d 20 22 44 61 74 61 54 | 65 73 74 22 20 66 72 6f |m "DataT|est" fro|
|00000160| 6d 20 74 68 65 20 6d 65 | 6e 75 20 22 4d 69 73 63 |m the me|nu "Misc|
|00000170| 22 2e 0d 7d 0d 0d 70 72 | 6f 67 72 61 6d 20 46 69 |"..}..pr|ogram Fi|
|00000180| 6e 64 6d 61 78 69 6d 75 | 6d 3b 0d 76 61 72 0d 20 |ndmaximu|m;.var. |
|00000190| 20 72 2c 63 3a 69 6e 74 | 65 67 65 72 3b 6d 61 78 | r,c:int|eger;max|
|000001a0| 2c 6d 69 6e 3a 65 78 74 | 65 6e 64 65 64 3b 0d 20 |,min:ext|ended;. |
|000001b0| 20 6d 61 78 52 2c 6d 61 | 78 43 2c 6d 69 6e 52 2c | maxR,ma|xC,minR,|
|000001c0| 6d 69 6e 43 3a 69 6e 74 | 65 67 65 72 3b 0d 0d 0d |minC:int|eger;...|
|000001d0| 62 65 67 69 6e 0d 20 20 | 6d 61 78 3a 3d 2d 69 6e |begin. |max:=-in|
|000001e0| 66 3b 6d 69 6e 3a 3d 69 | 6e 66 3b 0d 20 20 66 6f |f;min:=i|nf;. fo|
|000001f0| 72 20 63 3a 3d 53 65 6c | 65 63 74 4c 65 66 74 20 |r c:=Sel|ectLeft |
|00000200| 74 6f 20 53 65 6c 65 63 | 74 52 69 67 68 74 20 64 |to Selec|tRight d|
|00000210| 6f 0d 20 20 62 65 67 69 | 6e 0d 20 20 20 09 66 6f |o. begi|n. .fo|
|00000220| 72 20 72 3a 3d 53 65 6c | 65 63 74 54 6f 70 20 74 |r r:=Sel|ectTop t|
|00000230| 6f 20 53 65 6c 65 63 74 | 42 6f 74 74 6f 6d 20 64 |o Select|Bottom d|
|00000240| 6f 0d 09 20 20 20 20 69 | 66 20 52 6f 77 53 65 6c |o.. i|f RowSel|
|00000250| 65 63 74 65 64 28 72 29 | 20 74 68 65 6e 0d 20 20 |ected(r)| then. |
|00000260| 20 20 09 62 65 67 69 6e | 0d 09 20 20 20 09 09 69 | .begin|.. ..i|
|00000270| 66 20 64 61 74 61 6f 6b | 28 72 2c 63 29 20 74 68 |f dataok|(r,c) th|
|00000280| 65 6e 0d 09 20 20 20 09 | 09 62 65 67 69 6e 20 0d |en.. .|.begin .|
|00000290| 09 20 20 09 09 09 20 20 | 69 66 20 64 61 74 61 5b |. ... |if data[|
|000002a0| 72 2c 63 5d 3e 6d 61 78 | 20 74 68 65 6e 0d 09 20 |r,c]>max| then.. |
|000002b0| 20 20 09 09 09 09 62 65 | 67 69 6e 0d 09 09 09 09 | ....be|gin.....|
|000002c0| 09 20 20 20 20 09 6d 61 | 78 52 3a 3d 72 3b 6d 61 |. .ma|xR:=r;ma|
|000002d0| 78 43 3a 3d 63 3b 09 6d | 61 78 3a 3d 64 61 74 61 |xC:=c;.m|ax:=data|
|000002e0| 5b 6d 61 78 52 2c 6d 61 | 78 43 5d 3b 0d 09 20 20 |[maxR,ma|xC];.. |
|000002f0| 20 09 09 09 09 65 6e 64 | 3b 0d 09 09 20 20 20 09 | ....end|;... .|
|00000300| 09 09 69 66 20 64 61 74 | 61 5b 72 2c 63 5d 3c 6d |..if dat|a[r,c]<m|
|00000310| 69 6e 20 74 68 65 6e 0d | 09 09 20 20 20 09 09 09 |in then.|.. ...|
|00000320| 62 65 67 69 6e 0d 09 09 | 20 20 20 20 09 09 09 09 |begin...| ....|
|00000330| 6d 69 6e 52 3a 3d 72 3b | 6d 69 6e 43 3a 3d 63 3b |minR:=r;|minC:=c;|
|00000340| 09 6d 69 6e 3a 3d 64 61 | 74 61 5b 6d 69 6e 52 2c |.min:=da|ta[minR,|
|00000350| 6d 69 6e 43 5d 3b 0d 09 | 20 20 20 09 09 09 09 65 |minC];..| ....e|
|00000360| 6e 64 0d 20 20 09 09 20 | 09 65 6e 64 0d 09 20 09 |nd. .. |.end.. .|
|00000370| 20 20 65 6e 64 0d 20 20 | 65 6e 64 3b 0d 20 20 57 | end. |end;. W|
|00000380| 72 69 74 65 6c 6e 28 27 | 6d 61 78 20 69 73 20 27 |riteln('|max is '|
|00000390| 2c 6d 61 78 2c 27 20 61 | 74 20 28 27 2c 6d 61 78 |,max,' a|t (',max|
|000003a0| 52 2c 27 2c 27 2c 6d 61 | 78 43 2c 27 29 27 29 3b |R,',',ma|xC,')');|
|000003b0| 0d 20 20 57 72 69 74 65 | 6c 6e 28 27 6d 69 6e 20 |. Write|ln('min |
|000003c0| 69 73 20 27 2c 6d 69 6e | 2c 27 20 61 74 20 28 27 |is ',min|,' at ('|
|000003d0| 2c 6d 69 6e 52 2c 27 2c | 27 2c 4d 69 6e 43 2c 27 |,minR,',|',MinC,'|
|000003e0| 29 27 29 3b 0d 65 6e 64 | 3b 00 00 00 00 00 00 00 |)');.end|;.......|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 00 00 01 00 00 00 02 b9 | 00 00 01 b9 00 00 00 76 |........|.......v|
|00000410| 09 20 20 09 09 09 20 20 | 69 66 20 64 61 74 61 5b |. ... |if data[|
|00000420| 72 2c 63 5d 3e 6d 61 78 | 20 74 68 65 6e 0d 09 20 |r,c]>max| then.. |
|00000430| 15 46 69 6e 64 4d 61 78 | 69 6d 75 6d 41 6e 64 4d |.FindMax|imumAndM|
|00000440| 69 6e 69 6d 75 6d 02 00 | 00 00 66 74 46 43 4e 4c |inimum..|..ftFCNL|
|00000450| 00 00 66 74 46 43 4e 4c | 66 74 01 00 00 00 00 80 |..ftFCNL|ft......|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 80 00 00 00 00 00 |........|........|
|00000470| 00 00 a5 78 06 43 00 00 | 03 69 00 00 03 2f 20 09 |...x.C..|.i.../ .|
|00000480| 09 09 69 66 20 64 61 74 | 61 5b 72 2c 63 5d 3c 6d |..if dat|a[r,c]<m|
|00000490| 69 6e 20 74 68 65 6e 0d | 09 09 20 20 20 09 09 09 |in then.|.. ...|
|000004a0| 62 65 67 69 6e 0d 09 09 | 20 20 20 20 09 09 09 09 |begin...| ....|
|000004b0| 6d 69 6e 52 3a 3d 72 3b | 6d 69 6e 43 3a 3d 63 3b |minR:=r;|minC:=c;|
|000004c0| 09 6d 69 6e 3a 3d 64 61 | 74 61 5b 6d 69 6e 52 2c |.min:=da|ta[minR,|
|000004d0| 6d 69 6e 43 5d 3b 0d 09 | 20 20 20 09 09 09 09 65 |minC];..| ....e|
|000004e0| 6e 64 0d 20 20 09 09 20 | 09 65 6e 64 0d 09 20 09 |nd. .. |.end.. .|
|000004f0| 20 20 65 6e 64 0d 20 20 | 65 6e 64 3b 0d 20 20 57 | end. |end;. W|
|00000500| 00 00 00 08 00 29 00 02 | 01 df 01 a7 00 00 01 06 |.....)..|........|
|00000510| 00 04 00 09 00 00 06 4d | 6f 6e 61 63 6f 80 02 63 |.......M|onaco..c|
|00000520| 04 00 00 00 2d e8 02 87 | f7 70 22 00 02 28 40 a1 |....-...|.p"..(@.|
|00000530| 27 a0 00 58 78 e0 00 81 | 00 00 00 01 d9 94 00 0b |'..Xx...|........|
|00000540| 00 06 00 0b 00 06 00 00 | 00 81 02 62 75 40 00 00 |........|...bu@..|
|00000550| 00 00 02 62 6b 04 00 00 | 00 81 02 62 75 40 00 00 |...bk...|...bu@..|
|00000560| 00 00 ff ff ff ff 02 87 | f8 c0 02 62 5f 3c 03 22 |........|...b_<."|
|00000570| 67 78 02 62 65 9e 02 62 | 64 e8 02 62 0d 80 02 87 |gx.be..b|d..b....|
|00000580| f7 a8 00 00 00 00 02 87 | f8 a8 00 00 63 20 00 00 |........|....c ..|
|00000590| 00 7d 00 00 00 15 00 00 | 00 00 00 00 00 05 00 00 |.}......|........|
|000005a0| 00 6d 00 00 00 00 02 87 | f8 20 24 08 02 82 00 14 |.m......|. $.....|
|000005b0| d3 44 00 19 5a 90 02 87 | f8 20 00 18 bc 8c 00 14 |.D..Z...|. ......|
|000005c0| cb 14 00 00 63 20 02 87 | f8 20 00 18 bc 8c 00 1a |....c ..|. ......|
|000005d0| 8f 0c 00 1a 8f 00 02 87 | f8 50 00 18 bc 8c 00 6e |........|.P.....n|
|000005e0| 00 06 00 6e 00 06 02 87 | f8 30 00 1a 8f 24 00 1a |...n....|.0...$..|
|000005f0| f2 94 00 0c f4 a0 00 01 | ee 50 00 01 2f a4 00 00 |........|.P../...|
|00000600| 00 00 00 0c f4 d0 02 62 | 88 a2 00 19 5a 70 07 80 |.......b|....Zp..|
|00000610| 03 80 00 00 00 00 00 00 | 00 10 00 00 00 00 00 00 |........|........|
|00000620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 04 00 00 |........|........|
|00000630| 00 01 00 00 00 78 00 03 | 00 00 00 48 00 48 00 00 |.....x..|...H.H..|
|00000640| 00 00 02 da 02 28 ff e1 | ff e2 02 f9 02 46 03 47 |.....(..|.....F.G|
|00000650| 05 28 03 fc 00 02 00 00 | 00 48 00 48 00 00 00 00 |.(......|.H.H....|
|00000660| 02 da 02 28 00 01 00 00 | 00 64 00 00 00 01 00 01 |...(....|.d......|
|00000670| 01 01 00 00 00 01 27 0f | 00 01 00 01 00 00 00 00 |......'.|........|
|00000680| 00 00 00 00 00 00 00 00 | 68 08 00 19 01 90 00 00 |........|h.......|
|00000690| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 01 00 00 |........|........|
|000006a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006b0| 00 07 06 70 72 6f 46 69 | 74 00 00 01 00 00 00 02 |...proFi|t.......|
|000006c0| b9 00 00 01 b9 00 00 00 | 76 02 62 9b fc 26 ee 00 |........|v.b..&..|
|000006d0| 00 00 1c 00 76 00 01 66 | 49 4e 46 00 04 00 12 53 |....v..f|INF....S|
|000006e0| 54 52 20 00 00 00 4e 00 | 81 ff ff 00 00 00 00 02 |TR ...N.|........|
|000006f0| 60 bf 1c 00 82 ff ff 00 | 00 00 0c 02 62 8e 94 00 |`.......|....b...|
|00000700| 83 ff ff 00 00 01 16 02 | 62 8d 6c 00 85 ff ff 00 |........|b.l.....|
|00000710| 00 01 2a 02 60 72 54 00 | 84 ff ff 00 00 01 32 02 |..*.`rT.|......2.|
|00000720| 62 8e 9c bf f4 ff ff 00 | 00 01 ae 02 62 92 5c 00 |b.......|....b.\.|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+